<template>
  <div>
    <van-nav-bar
      title="商品详情"
      left-text="返回"
      right-text="分享"
      left-arrow
      @click-left="onClickLeft"
      @click-right="showShare = true"
    />
    <van-share-sheet
  v-model="showShare"
  title="立即分享给好友"
  :options="options"
/>
    <router-view />
  </div>
</template>

<script>
import Vue from 'vue';
import { ShareSheet } from 'vant';
Vue.use(ShareSheet);
export default {
  data(){
    return{
      showShare: false,
      options: [
        [
          { name: '微信', icon: 'wechat' },
          { name: '朋友圈', icon: 'wechat-moments' },
          { name: '微博', icon: 'weibo' },
          { name: 'QQ', icon: 'qq' },
        ],
        [
          { name: '复制链接', icon: 'link' },
          { name: '分享海报', icon: 'poster' },
          { name: '二维码', icon: 'qrcode' },
          { name: '小程序码', icon: 'weapp-qrcode' },
        ],
      ],
    }
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    },
  },
};
</script>

<style scoped>
</style>
